# !/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName : two_stack_to_queue.py
# @Time     : 2024/2/22 0:18
# @Author   : Robot-Zsj
"""
description: 
"""


class Queue:
    def __init__(self):
        self.stack1 = []
        self.stack2 = []

    def push(self, num):
        self.stack1.append(num)

    def pop(self):
        if len(self.stack2) == 0:
            while self.stack1:
                self.stack2.append(self.stack1.pop())
        return self.stack2.pop()


q = Queue()
q.push(1)
q.push(2)
print(q.pop())
q.push(3)
print(q.pop())
print(q.pop())
